<?php

namespace app\helpers;

use Carbon\Carbon;

class DateFormatHelper
{
    public static function getDateBetween($start,$end)
    {
        $list = [];
        $carbonStart = Carbon::parse($start);
        $carbonEnd = Carbon::parse($end);
        $days = $carbonEnd->diffInDays($carbonStart);
        foreach (range(0,$days) as $day){
            $list[]= Carbon::parse($start)->addDays($day)->format('Y-m-d');
        }
        return $list;
    }
}